package com.dq.health.enums;

/**
 * <基础状态>
 *
 * @Author: chenxin
 * @Date: 2021/5/12
 */
public enum BaseStatusEnum {

    ENABLED(1, "启用"), DELETE(2, "删除");

    private int value;

    private String desc;

    BaseStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int value() {
        return value;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static BaseStatusEnum parse(int value) {
        for (BaseStatusEnum e : BaseStatusEnum.values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return null;
    }

}
